import 'package:flutter_yd_simple/Project/Server/Config.dart';
import 'package:flutter_yd_simple/Project/Server/HttpRequest.dart';
import 'package:fluttertoast/fluttertoast.dart';

class HomeRequest {
  Future<List>getHomeList(int page,int count) async {
    // 发送请求
    final result = await httpRequest.request(
      HomeAPI.API, params: {
        'videoLibrary':'1','size':count,'curriculumIdList':[2],'page':page
      }
    );
    Fluttertoast.showToast(msg: result["message"]);

    // 转成模型
    List movies = [];
    final subjects = result["subjects"];

    // 这里遍历 subjects 进行json解析以及将数据 bean 添加到数据并返回

    //返回数据
    return movies;

  }
}